<?php

class CustReserve extends AppModel {
    var $name = 'CustReserve';

    var $useTable = 'cust_reserves';

    var $belongsTo = array('Product', 'CustProductSite',
        'CustReserveHead' => array(
            'foreignKey' => 'cust_reserve_head_id'
        ),
    );

    var $hasMany = array(
        'ProductSerial' => array(
            'foreignKey' => 'cust_reserve_id',
        )
    );

    var $validate = array(
        'reserve_qty' => array(
                'rule' => 'numeric',
                'message' => 'Please input reserve qty.',
                'on' => 'create'
        ),
    );
}
?>
